package com.ruoyi.common.enums;

/**
 * @author ：wk
 * @date ：Created in 2023/2/22 15:10
 */
public enum SexType {

    woman("0","女"),
    man("1","男");

    private final String code;
    private final String info;

    SexType(String code, String info){
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static SexType sexTypeOf(String info) {
        for(SexType sexType : values()){
            if(sexType.getInfo().equals(info)){
                return sexType;
            }
        }
        return null;
    }
}
